Error: The system cannot find...(during XCOPY) (due to long filenames).
Error:
The system cannot find the file specified, or the system cannot find the path specified.
Cause:
The XCOPY command is being used to copy files from a drive that supports only long filenames to a drive supporting only short filenames (e.g., Windows for Workgroups). The file(s) being copied do not conform to the MS-DOS 8.3 naming convention. XCOPY cannot create the file on the destination drive.
Solution:
Rename files or folders, using uppercase 8.3-compliant filenames. Use XCOPY /C to enable files with the correct filename to be copied while skipping those with incorrect filenames. Use XCOPY /N to copy auto-generated short filenames.
1) Type the following at the prompt and press ENTER:
XCOPY /C <directory1> <directory2>
2) Rename the files not copied to a standard 8.3-compliant filename:
a) To change to the directory containing the file(s), type:
CD\<directory>
(where <directory> is the directory containing the file(s)).
b) Rename the file(s) by typing the following and pressing ENTER:
REN <filename> <newfilename>
(where <filename> is the current name of the file and <newfilename> is the new name for the same file that MUST BE in the DOS 8.3 format).
3) Type the following and press ENTER:
XCOPY <newfilename> X:\<directory>
(where <newfilename> is the name of the file in DOS 8.3 format, and <directory> is the directory to which the file will be copied).
NOTE: This command copies the new filename to the destination drive.